import QtQuick
import QtQuick3D

import Utils

ItemBase{
    Node {
        id: __materialLibrary__

        PrincipledMaterial {
            id: bottleMaterial
            baseColorMap: bottleTexture
        }

        PrincipledMaterial {
            id: liquidMaterial
            baseColorMap: liquidTexture
            baseColor: liquidColor
            lighting: PrincipledMaterial.NoLighting
        }

    }

    property color liquidColor:"red"

    property url bottleTex:"./tex/potion_bottle_splash.png"

    property url liquidTex:"./tex/potion_overlay.png"

    Texture{
        id:bottleTexture
        mipFilter: Texture.Linear
        source: bottleTex
    }


    Texture{
        id:liquidTexture
        mipFilter: Texture.Linear
        source: liquidTex
    }

    Model{
        geometry: MCItemGeometry{
            source: bottleTex
        }

        materials: bottleMaterial
        eulerRotation.x:90
    }

    Model{
        geometry: MCItemGeometry{
            source: liquidTex
        }

        materials: liquidMaterial
        eulerRotation.x:90
    }


}
